//导入request.js请求工具
import request from '@/utils/request.js'


// 设备分页显示
export const deviceStatusListService = (params) => {
    return request.get('/device', { params: params })
}

// 根据id找设备
export const deviceDetailListService = (params) => {
    return request.get('/device/detail', { params: params })
}

// 设备全部显示
export const deviceAllListService = () => {
    return request.get('device/all')
}

// 设备添加
export const deviceAddService = (form) => {
    return request.post('/device', form)
}

// 设备删除
export const deviceDeleteService = (id) => {
    return request.delete('/device?id=' + id)
}

// 故障设备分页显示
export const deviceWarnListService = (params) => {
    return request.get('/device/warn', { params: params })
}

// 正常设备显示
export const deviceNormalListService = () => {
    return request.get('/device/normal')
}

//修改设备故障状态
export const deviceWarnUpdateService = (form) => {
    return request.put('/device/warn', form)
}

// 故障设备已解决分页显示
export const deviceStraListService = (params) => {
    return request.get('/device/stra', { params: params })
}

// 故障设备处理策略
export const deviceStraUpdateService = (form2) => {
    return request.put('/device/stra', form2)
}